package com.oceanread.cn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Turbine;
import com.oceanread.cn.entity.Turbinelist;
import com.oceanread.cn.mapper.TurbineMapper;
import com.oceanread.cn.mapper.TurbinelistMapper;
import com.oceanread.cn.service.ITurbineService;
import com.oceanread.cn.service.ITurbinelistService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ITurbinelistServiceImpl extends ServiceImpl<TurbinelistMapper, Turbinelist> implements ITurbinelistService {
    public List<Turbinelist> getall() {
        return baseMapper.getall();
    }

    @Override
    public List<Turbinelist> query(int page, int size, String key, String value) {
        return baseMapper.query((page - 1) * size, size, key, value);
    }
    @Override
    public List<Turbinelist> equal( String key, String value) {
        return baseMapper.equal(key, value);
    }

    @Override
    public List<Turbinelist> getTablelist(int page, int size) {
        return baseMapper.getTablelist((page - 1) * size, size);
    }

    public Integer getnum() {
        return baseMapper.getnum();
    }

    public Integer getnumquery(String key, String value) {
        return baseMapper.getnumquery(key, value);
    }

    @Override
    public int insert(String PrjCode, String Name,String Num,String Region,String Datetime,String Lon,String Lat,String Height) {
        return baseMapper.insert(PrjCode, Name, Num, Region, Datetime,Lon, Lat, Height);
    }
    @Override
    public Integer update(Turbinelist turbinelist) {
        return baseMapper.update(turbinelist.getSysid(),turbinelist.getPrjCode(),turbinelist.getName(),
                turbinelist.getNum(),turbinelist.getRegion(),turbinelist.getDatetime(),
                turbinelist.getLon(),turbinelist.getLat(),turbinelist.getHeight());
    }
    public Integer delete(int sysid) {
        return baseMapper.delete(sysid);
    }

}
